<?php

/**
 * Familiar form base class.
 *
 * @package    isaac
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseFamiliarForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'             => new sfWidgetFormInputHidden(),
      'nombre'         => new sfWidgetFormInput(),
      'tipo_documento' => new sfWidgetFormInput(),
      'documento'      => new sfWidgetFormInput(),
      'nacimiento'     => new sfWidgetFormDate(),
      'nivel_estudio'  => new sfWidgetFormInput(),
      'orden'          => new sfWidgetFormInput(),
      'parentezco'     => new sfWidgetFormInput(),
      'baja'           => new sfWidgetFormDate(),
      'personal_id'    => new sfWidgetFormPropelChoice(array('model' => 'Personal', 'add_empty' => true)),
      'created_at'     => new sfWidgetFormDateTime(),
      'updated_at'     => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'             => new sfValidatorPropelChoice(array('model' => 'Familiar', 'column' => 'id', 'required' => false)),
      'nombre'         => new sfValidatorString(array('max_length' => 48)),
      'tipo_documento' => new sfValidatorNumber(array('required' => false)),
      'documento'      => new sfValidatorNumber(array('required' => false)),
      'nacimiento'     => new sfValidatorDate(array('required' => false)),
      'nivel_estudio'  => new sfValidatorNumber(array('required' => false)),
      'orden'          => new sfValidatorNumber(array('required' => false)),
      'parentezco'     => new sfValidatorNumber(array('required' => false)),
      'baja'           => new sfValidatorDate(array('required' => false)),
      'personal_id'    => new sfValidatorPropelChoice(array('model' => 'Personal', 'column' => 'id', 'required' => false)),
      'created_at'     => new sfValidatorDateTime(array('required' => false)),
      'updated_at'     => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('familiar[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Familiar';
  }


}
